#include "ReferenceCounted.hpp"
#include "WeakReference.hpp"

namespace ge {

//----------------------------------------------------------------------------//
// ReferenceCounted
//----------------------------------------------------------------------------//

int ReferenceCounted::ms_total_count = 0; 

//----------------------------------------------------------------------------//
void ReferenceCounted::_InitWeakRef( void )
{
     if( !m_weakref ) m_weakref = new WeakReference( this );
}
//----------------------------------------------------------------------------//
void ReferenceCounted::_DeinitWeakRef( void )
{
     if( m_weakref )
     {
          WeakReference::_Reset( m_weakref );
          m_weakref = 0;
     }
}
//----------------------------------------------------------------------------//

//----------------------------------------------------------------------------//
//
//----------------------------------------------------------------------------//

} // namespace ge
